<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>    
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">    
<html>    
  <head>    
    <base href="<%=basePath%>">    
        
    <title>新增用户</title>  
    <script type="text/javascript">
    function check(){
    	   var name = document.getElementById("name").value;
    	   var password = document.getElementById("password").value;
    	   var age = document.getElementById("age").value;
    	   if(name ==  null || name == ''){
    	        alert("用户名不能为空");
    	        return false;
    	   }
    	   if(password ==  null || password == ''){
    	        alert("密码不能为空");
    	        return false;
    	   }
    	   if(age ==  null || age == ''){
    	        alert("年龄不能为空");
    	        return false;
    	   }
    	   return true;
    	}
    
    
    </script>
  </head>    
      
  <body style="height: 100%">    
    <form id="addUser" action="user/addUser" method="post" onsubmit="return check()">     
     		             用户名: <input id="name" name="name" /><br/>     
      			  密码: <input id="password" name="password" /><br/>    
   			             年龄: <input id="age" name="age" /><br/>    
        <input type="submit" value="添加新用户"/>     
    </form>    
  </body>    
</html>